
package com.scs.application.modules.msg.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.core.model.PageResult;
import com.scs.application.core.mvc.controller.CrudController;
import com.scs.application.core.mvc.controller.ImAndExAbleController;
import com.scs.application.modules.msg.entity.MscmPushedRecord;
import com.scs.application.modules.msg.request.MscmPushedRecordQueryRequest;
import com.scs.application.modules.msg.service.MscmPushedRecordService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 已推送记录 controller
*
*/
@AllArgsConstructor
@RestController
@RequestMapping("/mscm_pushed_records")
public class MscmPushedRecordController extends CrudController<MscmPushedRecord, String, MscmPushedRecordService> implements ImAndExAbleController<MscmPushedRecordQueryRequest> {

    @GetMapping("/page")
    public PageResult page(MscmPushedRecordQueryRequest request) {
        IPage<MscmPushedRecord> page = service.page(request);
        return PageResult.ok("查询成功", page.getRecords(), page.getTotal());
    }

}
